<?php
namespace app\common\validate;

use think\Validate;

class NoticeValidate extends Validate
{
    protected $rule =   [
        'id'               => 'require|number',
        'page|页数'        => 'require|number',
        'limit|条数'       => 'require|number',
        'title|标题'       => 'require|length:1,255',
        'content|内容'     => 'require',
    ];
    
    protected $scene = [
        /** admin */
        'show'   => ['id'],
        'list'   => ['page', 'limit'],
        'add'    => ['title', 'content'],
        'edit'   => ['id', 'title', 'content'],
    ];
}